//封装有关token的方法

const hmKey = 'love-token'

//获取token
export function getToken () {
  return JSON.parse(localStorage.getItem(hmKey))
}

//存token
export function saveToken (obj) {
  localStorage.setItem(hmKey, JSON.stringify(obj))
}

//删除Token
export function removeToken () {
  localStorage.removeItem(hmKey)
}
